<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/4/1 0001
 * Time: 14:47
 */
require_once './QuestionCombination.php';
$courseMap = [
    [
        'id'=>1,
        'score'=>10,
    ],[
        'id'=>2,
        'score'=>5,
    ],
    [
        'id'=>3,
        'score'=>20,
    ],
    [
        'id'=>4,
        'score'=>10,
    ],[
        'id'=>5,
        'score'=>2,
    ],[
        'id'=>6,
        'score'=>10,
    ],
];

$weights = [
    10=>5,
    2=>2,
    20=>1,
    5=>2
];


echo '<pre>';
print_r(QuestionCombination::select($courseMap,30,$weights));
die();
